<template>
  <el-row>
    <el-col :span="24">
      <div style=" width: 97%; margin: auto;">
        <h3>其它需要说明的情况</h3>
        <el-form  size="default" :model="postForm" ref="postForm" :rules="postFormRules">
          <el-form-item prop="otherExplain">
            <el-input type="textarea" placeholder="请输入其它需要说明的情况" :rows="14" v-model="postForm.otherExplain"
                      maxlength="2000"
                      show-word-limit/>
          </el-form-item>
        </el-form>
      </div>
    </el-col>
  </el-row>
</template>
<script>
import { getTableInfoByPage, stSaveSummary, stSaveSummaryOther } from '@/views/yearCheck/ykb/st/st'

export default {
  data() {
    return {
      postForm: {
        activityProposal: '',//活动主要成绩、问题和管理政策建议
        assetTermName: '',//工作总结/计划
        creditCode: '',//统一社会信用代码
        examineYear: '',//审查年度
        organizationBaseId: '',//社团组织id
        otherExplain: '',//其它说明
      },
      postFormRules:{
        otherExplain:[{required:true,message:'请输入',trigger:'blur'}],
      }
    };
  },
  created() {

  },
  methods: {
    postInfo() {
      this.$refs.postForm.validate(valid=> {
        if (valid) {
          this.postForm.creditCode = localStorage.getItem("creditCode");
          this.postForm.examineYear = localStorage.getItem("examineYear");
          stSaveSummaryOther(this.postForm).then(response => {
            this.$message({
              message: '其它需要说明的情况保存成功',
              type: 'success'
            });
            this.getInfo();
          });
        } else {
          this.$message({
            message: '请输入！',
            type: 'error'
          });
        }
      });
    },
    getInfo() {
      getTableInfoByPage(19).then(response => {
        this.postForm = JSON.parse(JSON.stringify(response.data).replace(/null/g, '""'));
      });
    }
  }
}
</script>
<style scoped lang="scss">
.el-table {
  --el-table-row-hover-bg-color: rgba(39, 137, 238, 0.1);
  --el-table-border-color:#e0e5f0;
}
:deep(.el-card.is-always-shadow) {
  box-shadow: 0 1px 14px 0 rgba(209, 224, 239, 0.6)
}

/* 拉框选中 */
.el-select-dropdown__item {
  height: 24px;
  line-height: 24px;
  font-size: 12px;
}

/* 鼠标经过下拉框 */
.el-select-dropdown__item:hover {
  height: 24px;
  line-height: 24px;
  font-size: 12px;
}

.el-select-dropdown__item.selected {
  color: #2789EE;
}
.app-container {
  margin-top: 40px;
  margin-left: 15%;
  width: 70%;
}

.div-bg {
  width: 100%;
  background: #F0F0F0;
  height: 10px;
}

.box-card {
  width: 100%;
  margin-top: 20px;
  padding: 20px;
}

.el-col {
  padding-left: 5px;
}

.divider-title {
  font-weight: bold;
  font-size: 18px;
}

.custom-select .el-select-dropdown {
  max-height: 600px; /* 设置为你想要的高度 */
  overflow: auto; /* 添加滚动条 */
}

table {
  border-collapse: collapse; /* 确保表格的边框合并为单一边框 */
  width: 100%; /* 表格宽度 */
}

td {
  border: 1px solid #ababab; /* 设置单线边框 */
  padding: 6px; /* 单元格内边距 */
}
.el-form-item {
  margin-bottom: 0px;
}
</style>
